package com.controller;

import com.entity.EmpEntity;
import com.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EmpController {

    @Autowired
    private EmpService empService;

    @RequestMapping("/list/{pagenum}/{pagesize}")
    public List<EmpEntity> getAll(@PathVariable("pagenum")int pagenum,@PathVariable("pagesize") int pagesize){
        return empService.getAll(pagenum,pagesize);
    }
}
